package day05;
import java.util.Scanner;
import java.util.Arrays;
public class Test2 {
    public static void main(String[] args) {/*
        Scanner scan = new Scanner(System.in);
        int score = 0;
        for(int i = 1;i<=10;i++){
            int a = (int)(Math.random()*100);
            int b = (int)(Math.random()*100);
            int result = a+b;
            System.out.println("("+i+")"+a+"+"+b+"=");
            System.out.println("请答题：");
            int answer = scan.nextInt();

            if(answer==result){
                System.out.println("答对了");
                score+=10;
            }else {
                System.out.println("答错了");
            }
        }
        System.out.println("总分为："+score);*/
        /*for(int num = 1;num<=9;num++){
            for(int i =1; i<=num;i++){
                System.out.print(i+"*9="+i*9+"\t");
            }
            System.out.println();

        }*/
       //**/
        /*int [] arr = new int[4];
        for(int i = 0;i<arr.length;i++){
            arr [i] = (int)(Math.random()*100);
            System.out.println(arr[i]);
        }
        int max = arr[0];
        for(int i = 1;i<arr.length;i++){
            if(arr[i]>max){
                max = arr[i];
            }
        }
        System.out.println(max);*/
        int [] arr = new int[6];
        for(int i = 0;i<arr.length;i++){
            arr [i] = (int)(Math.random()*100);
            System.out.println(arr[i]);
        }
        System.out.println("-----升序后------");
        Arrays.sort(arr);
        for(int i = 0;i<arr.length;i++){
            System.out.println(arr[i]);
        }
    }
}
